package com.qeado.site.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qeado.site.dao.SiteContactInfoManageDao;
import com.qeado.site.model.SiteContactInfo;
import com.qeado.site.service.SiteContactInfoManageService;

@Service
public class SiteContactInfoManageServiceImpl implements SiteContactInfoManageService {

	@Autowired
	private SiteContactInfoManageDao siteContactInfoManageDao;
	
	public SiteContactInfo getSiteConactInfo() {
		return this.siteContactInfoManageDao.getSiteConactInfo();
	}
	public void saveSiteContactInfo(SiteContactInfo siteContactInfo) {
		SiteContactInfo temp = this.siteContactInfoManageDao.getSiteConactInfo();
		if(temp == null){// no record
			  //insert	
				this.siteContactInfoManageDao.insertSiteContactInfo(siteContactInfo);
			}
			else{
			  //update
				this.siteContactInfoManageDao.updateSiteContactInfo(siteContactInfo);
				
			}
		
	}

}
